const path = require('path')

const MyPlugin = require('./plugins/MyPlugin')
const DemoWebpackPlugin = require('./plugins/DemoPlugin')
module.exports = {
    mode: "development",
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: '[name].js'
    },
    module: {
        rules: [
            {
                test: /\.(le|c)ss$/,
                use: ['style-loader', 'css-loader',
                    {
                        loader: 'postcss-loader',
                        options: {
                            plugins: function () {
                                return [
                                    require('autoprefixer')({
                                        "overrideBrowserslist": [
                                            ">0.25%",
                                            "not dead"
                                        ]
                                    })
                                ]
                            }
                        }
                    },
                    'less-loader'
                ],
                exclude: /node_modules/
            },
        ]
    },
    plugins: [
        new DemoWebpackPlugin(),
        new MyPlugin()
    ]
}